package patrol.mobile.com.mobilepatrol.adapter;

import android.content.Context;

import com.dl7.recycler.adapter.BaseQuickAdapter;
import com.dl7.recycler.adapter.BaseViewHolder;

import patrol.mobile.com.mobilepatrol.R;
import patrol.mobile.com.mobilepatrol.bean.TrafficChargeBean;

/**
 * Created by K on 2018/9/14.
 * des: 交通量收费额
 */
public class TrafficChargeAdapter extends BaseQuickAdapter<TrafficChargeBean> {
    public TrafficChargeAdapter(Context context) {
        super(context);
    }

    @Override
    protected int attachLayoutRes() {
        return R.layout.item_traffic_charge;
    }

    @Override
    protected void convert(BaseViewHolder holder, TrafficChargeBean item) {
        holder.setText(R.id.tv_num, holder.getAdapterPosition() + 1 + "");
        holder.setText(R.id.tv_title, item.getOrgName());
        holder.setText(R.id.tv_time, item.getUpDate());
        holder.setText(R.id.tv_tongxingfei, "通行费：" + item.getToll() + "元");
        holder.setText(R.id.tv_jiaotongliang, "交通量：" + item.getTotal()+"辆");
    }
}
